package com.lxyk.sgq.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * (Stock)表实体类
 *
 * @author makejava
 * @since 2023-04-20 16:32:06
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("stock")
public class Stock extends Model<Stock> {
    //唯一标识
    @TableId(value = "id",type= IdType.ASSIGN_ID)
    private Long id;
    //商品id
    @TableField("goods_id")
    private Integer goodsId;
    //库存剩余
    private Integer count;
    //创建时间
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    //更新时间
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;
    //是否可用 0：不可用，1：可用
    private String state;
    //版本
    @Version
    @TableField(fill = FieldFill.INSERT)
    private Integer version;

    }

